package com.qinglei.recoup.app.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.qinglei.recoup.app.pojo.SubscribeParam;
import com.qinglei.recoup.app.pojo.TagParam;
import com.qinglei.recoup.common.domain.CommonRes;
import com.qinglei.recoup.common.tenant.TenantContextHolder;
import com.qinglei.recoup.system.domain.Bed;
import com.qinglei.recoup.system.domain.Radar;
import com.qinglei.recoup.system.pojo.AddRadarParam;
import com.qinglei.recoup.system.service.BedService;
import com.qinglei.recoup.system.service.RadarService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import  com.qinglei.recoup.app.service.AppRadarService;

@RestController
@RequestMapping("/weixin")
public class AppRadarController {

    @Resource
    private AppRadarService AppRadarService;

    @PostMapping("/appAddRadar")
    public CommonRes appAddRadar(@Valid @RequestBody AddRadarParam addRadarParam) {
        return AppRadarService.appAddRadar(addRadarParam);
    }

    @PostMapping("/removeAddRadar")
    public CommonRes removeAddRadar(@Valid @RequestBody AddRadarParam addRadarParam) {
        return AppRadarService.removeAddRadar(addRadarParam);
    }
    @PostMapping("/setTag")
    public CommonRes  setTag( @RequestBody TagParam tagParam){
        return  AppRadarService.setTag(tagParam);
    }

    @PostMapping("/setSubscribe")
    public CommonRes  setSubscribe( @RequestBody SubscribeParam subscribeParam){
        return  AppRadarService.setSubscribe(subscribeParam);
    }

    @PostMapping("/cancelSubscribe")
    public CommonRes  cancelSubscribe( @RequestBody SubscribeParam subscribeParam) {
        return AppRadarService.cancelSubscribe(subscribeParam);
    }

    @GetMapping("/moreDevice")
    public CommonRes  moreDevice() {
        return AppRadarService.moreDevice();
    }
}
